<!--
 * @Description: 
 * @Date: 2022-07-01 08:50:14
 * @LastEditTime: 2023-05-25 09:57:28
 * @FilePath: \vue3\src\views\vue3Study\children2.vue
-->
<template>
  <div style="background:#1E90FF;">

    <div>我叫:{{ mName }}</div>
    <div>我爹叫:{{ fName }}</div>
    <button @click="sayBaba">说话</button>
  </div>
</template>
<script>
import { ref } from "vue";
import tableTitle from '../../components/TitleTitle.vue';
export default {
  components: { tableTitle },
  props: ["fName"],
  setup(props,context) {
    // console.log("setup22222")
    let mName = ref("傻子gay");
    let fName = props.fName
    function sayBaba(){
        console.log(`${fName}是我${mName.value}的爹`)
        context.emit('eat',mName.value)
    }
    return {
      mName,fName,sayBaba
    };
  },
};
</script>